package May._06.test31;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) throws ParseException {
        Student[] students = new Student[4];
        Scanner scanner = new Scanner(System.in);
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy--MM-dd");
        for (int i = 0; i < students.length; i++) {
            String msg = scanner.nextLine();
            String[] split = msg.split(" ");
            int age = Integer.parseInt(split[1]);
            Date birth = simpleDateFormat.parse(split[3]);
            Student student = new Student(split[0],age,split[2],birth);
            students[i]=student;
        }
    }
}
@Data
@NoArgsConstructor
@AllArgsConstructor
class Student{
    String name;
    int age;
    String address;
    Date birth;
}
